STEP 10: Great job! Now, let's have our sprite say the original price.

Remember, price is a float. To add a float to a string, we need to cast (convert) it using str().

  • In LOGIC, click on and drag in Convert to String.
  • Change the my_var inside str() to price.
  • Change the my_var to the left of the = to price_string.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)